﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using WebSite1.DataSet1TableAdapters;


namespace WebSite1
{
    public partial class whishlist : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Request["wlid"] != null)
            {
                Session["CurrentWishListID"] = Request["wlid"];
            }
            //ListView1.row
        }

       
        protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
        {

        }

        protected void GridView1_DataBound(object sender, EventArgs e)
        {

        }

        protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            if (e.Row.RowType == DataControlRowType.DataRow)
            {
                //if (e.Row.Cells[2].ToString() == Session[""])
                //{
                //   // GridView1.SelectedRow = e.r;
                //}

            }
        
        }

        protected void LinkButton1_Click(object sender, CommandEventArgs e)
        {
           // WishlistItemsInsertQuery(;

            //wishlist_itemsTableAdapter a = new wishlist_itemsTableAdapter();
            //a.Insert(
            SqlDataSource5.InsertParameters["i"].DefaultValue = e.CommandArgument.ToString();
            SqlDataSource5.Insert() ;
            GridView1.DataBind();
             
             
        }

         

        protected void ListView1_ItemCommand(object sender, ListViewCommandEventArgs e)
        {
            if (String.Equals(e.CommandName, "AddItem"))
            {
                SqlDataSource5.InsertParameters["i"].DefaultValue = e.CommandArgument.ToString();
                SqlDataSource5.Insert();
                GridView1.DataBind();
            }
        }
         
    }
}